<?php
//http://climb-game.51wom.com/api/?c=cron_upteam
include '../c/config.php';
$mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
$query=$mysqli->query("select id from ".$tableVer."_team ");

while ($list=$query->fetch_assoc()){
    $tid=$list['id'];
    echo $tid;
    echo '.....';
    $queryC=$mysqli->query("select count(id) as count from ".$tableVer."_group  where tid='".$tid."'  ");
    $getCData=$queryC->fetch_assoc();
    $count=$getCData['count'];
    echo $count;
    
    echo "<br />";
    $mysqli->query("update ".$tableVer."_team set renshu=".$count." where id='".$tid."' ");

}
    
 



$mysqli->close();

?>